import request from '@/utils/request'

// 查询取消请求及退款处理列表
export function listCancelOrder(query) {
  return request({
    url: '/system/cancelOrder/list',
    method: 'get',
    params: query
  })
}

// 查询取消请求及退款处理详细
export function getCancelOrder(cancellationId) {
  return request({
    url: '/system/cancelOrder/' + cancellationId,
    method: 'get'
  })
}

// 新增取消请求及退款处理
export function addCancelOrder(data) {
  return request({
    url: '/system/cancelOrder',
    method: 'post',
    data: data
  })
}

// 修改取消请求及退款处理
export function updateCancelOrder(data) {
  return request({
    url: '/system/cancelOrder',
    method: 'put',
    data: data
  })
}

// 删除取消请求及退款处理
export function delCancelOrder(cancellationId) {
  return request({
    url: '/system/cancelOrder/' + cancellationId,
    method: 'delete'
  })
}

// Body:
// {
// "cancellationId": "9",
// "status":"1",
// "auditDesc": “审核通过”
// }
// 审核取消订单
export function auditCancelOrder(data) {
  return request({
    url: '/system/cancelOrder/audit',
    method: 'post',
    data: data
  })
}